<div class="panel panel-default" ng-controller="AgencyPassengerCtrl">
	<div class="panel-heading">
		代售业务 / 代售用户列表 <span ng-if="dataList && dataList.length > 0">（共{{bigTotalItems}}个用户）</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.phone" class="form-control" placeholder="手机号">
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" ng-init="selected_format=formats[5]"
							datepicker-popup="{{selected_format}}" is-open="opened"
							ng-model="timeRange.startTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="开始时间" readOnly /> <span
							class="input-group-btn">
							<button type="button" class="btn btn-default" ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" ng-init="selected_format=formats[5]"
							datepicker-popup="{{selected_format}}" is-open="opened"
							ng-model="timeRange.endTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="结束时间" readOnly /> <span
							class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" has-authority="BOOKING">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="agencyList.selected" theme="bootstrap">
							<ui-select-match placeholder="选择代售点">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="agency in agencyList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" agency.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="agencyList.selected = undefined" class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-1">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th></th>
					<th>代售点</th>
					<th>昵称</th>
					<th>姓名</th>
					<th>手机号</th>
					<th>添加时间</th>
					<th>
						<a href tooltip="导出excel表格">
							<i class="fa fa-download" ng-click="export()"></i>
						</a>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="passenger in dataList">
					<td></td>
					<td>{{passenger.agencyName}}</td>
					<td>{{passenger.nickname}}</td>
					<td>{{passenger.name}}</td>
					<td>{{passenger.phone}}</td>
					<td>{{passenger.agencyTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
					<td></td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="7" style="text-align: center;">暂无代售点乘客信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>